import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

// 解决移动端点击事件300ms延迟
import fastclick from "fastclick";
fastclick.attach(document.body);

// 使用图片懒加载,滑到图片才加载图片
import VueLazyload from "vue-lazyload";
Vue.use(VueLazyload, {
  loading: require("./assets/img/common/load.svg") // 为图片加载前展示的默认图片路径
});

// 写一个模态框插件,通过代码调用即可
import toast from "components/common/toast";
Vue.use(toast);

Vue.config.productionTip = false;

// 添加事件总线
Vue.prototype.$bus = new Vue();

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
